# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-hidapi
pkgver=0.9.0
pkgrel=1
pkgdesc="Cython interface for hidapi"
url="https://github.com/trezor/cython-hidapi"
arch="all"
license="GPL-3.0-or-later"
depends="python3"
makedepends="py3-setuptools cython libusb-dev python3-dev eudev-dev hidapi-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/trezor/cython-hidapi/archive/$pkgver.tar.gz"
builddir="$srcdir/cython-hidapi-$pkgver"

build() {
	python3 setup.py build --with-system-hidapi
}

check() {
	python3 setup.py test --with-system-hidapi
}

package() {
	python3 setup.py install --with-system-hidapi --prefix=/usr --root="$pkgdir"
}

sha512sums="0e019902cd20248c889d07c728619094c1fe4f9b12390047921f5b471f3cdd52f61f4f73767a5aab9dd743bff14cf949a609ede23d29ee2ba23d453916bb43c8  py3-hidapi-0.9.0.tar.gz"
